package com.szrt.javaweb.ch01.dyn.aop;


import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class TYProxyTest {
	
	@Test
	public void testName() throws Exception {
		
		
		
		ClassPathXmlApplicationContext ioc = new ClassPathXmlApplicationContext("com/szrt/javaweb/ch01/dyn/applicationContext.xml");
		
		
		Object obj = ioc.getBean("ymactorDaoImpl");
		
		System.err.println(obj.getClass().getName());
		
		
		// ? 已经拿到了代理类  不知道怎么调用
		ActorDao ym =(ActorDao) obj;
		//ym.act();
		
		ym.insert("xxoo", 2883);
		
		ioc.close();
	}
}
